import request from '@/utils/request'

// 查询团购规则设置列表
export function listCondition(query) {
  return request({
    url: '/system/condition/list',
    method: 'get',
    params: query
  })
}

// 查询团购规则设置详细
export function getCondition(id) {
  return request({
    url: '/system/condition/' + id,
    method: 'get'
  })
}

// 新增团购规则设置
export function addCondition(data) {
  return request({
    url: '/system/condition',
    method: 'post',
    data: data
  })
}

// 修改团购规则设置
export function updateCondition(data) {
  return request({
    url: '/system/condition',
    method: 'put',
    data: data
  })
}

// 删除团购规则设置
export function delCondition(id) {
  return request({
    url: '/system/condition/' + id,
    method: 'delete'
  })
}

// 导出团购规则设置
export function exportCondition(query) {
  return request({
    url: '/system/condition/export',
    method: 'get',
    params: query
  })
}
